package com.cxf.demo;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.jws.WebService;

@WebService
public class UserServiceImpl implements UserService {
	private Map<Long, User> userMap = new HashMap<Long, User>();
	
	public UserServiceImpl() {
		User user =new User();
		user.setUserId(1L);
		user.setUsername("peter");
		user.setEmail("user@126.com");
		user.setGmtCreate(new Date());
		userMap.put(user.getUserId(), user);
	}

	@Override
	public String getName(Long userId) {
		return "hello"+userId;
	}

	@Override
	public User getUser(Long userId) {
		return userMap.get(userId);
	}

}
